#include "oled.h"
#include "vtor_i2c.h"

// 加入用户工程宏
#ifdef __USER_PROJECT__

// 加入需要依赖的头文件
//#include "xxx.h"

// 加入需要依赖的变量
extern unsigned char xxx;
extern VtorI2c* oledI2c;
extern unsigned char OLED_GRAM[8][128];

// 自行实现OLED_WR_Byte函数发送一个字节
void OLED_WR_Byte(unsigned char regData,unsigned char regAddr)
{
	VtorI2c_WriteMem(oledI2c, 0x78, regAddr, 1, &regData, 1);
	//HAL_I2C_Mem_Write(&hi2c1, 0x78, regAddr, 1, &regData, 1, 0xffff);
}

// 自行实现OLED_Refresh函数更新显存到OLED，连续写一行(可不写
void OLED_Refresh(void)
{
	
	VtorI2c_WriteMem(oledI2c, 0x78, OLED_DATA, 1,
		&(OLED_GRAM[0][0]), 128 * 8);
	// 非dma burst
	//HAL_I2C_Mem_Write(&hi2c1, 0x78, OLED_DATA, 1,
	//	&(OLED_GRAM[0][0]), 128 * 8, 0xffff);

}

#endif
